<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.css}">
    <link rel="stylesheet" th:href="@{/css/common.css}">
    <link rel="stylesheet" th:href="@{/bootstrap/datepicker/bootstrap-datepicker3.css}">
    <style>
        td {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        table td:hover{
            overflow: auto;
            white-space: pre-wrap;
        }

    </style>
</head>
<body>
<div th:insert="~{common/header::header2}"></div>
<div class="container-fluid">
    <div class="row">
        <div th:insert="~{common/menu::menu}" class="col-md-2"></div>
        <div class="col-md-10">
            <ul class="breadcrumb">
                <li><a th:href="@{/main.do}">后台主页</a></li>
                <li>辟谣管理</li>
                <li>辟谣信息查询</li>
            </ul>
            <div class="row">
                <div class="col-md-4">
                    <a th:href="@{/rumour-info/show.do}"><button type="button" class="btn btn-primary">全部数据</button></a>
                </div>
            </div>
            <table style="table-layout: fixed" class="table table-striped">
                <colgroup>
                    <col span="8" width="12%">
                </colgroup>
                <thead>
                <tr>
                    <th>辟谣标题</th>
                    <th>辟谣内容</th>
                    <th>结果</th>
                    <th>结果解释</th>
                    <th>辟谣机构</th>
                    <th>辟谣日期</th>
                    <th>发布人</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="list:${pageInfo.list}">
                    <td th:text="${list.getRefutationTitle()}"></td>
                    <td th:text="${list.getRefutationContent()}"></td>
                    <td th:text="${list.getResult()}"></td>
                    <td th:text="${list.getExplain()}"></td>
                    <td th:text="${list.getAuthor()}"></td>
                    <td th:text="${#dates.format(list.getDate(),'yyyy-MM-dd')}"></td>
                    <td th:text="${list.getLoginName()}"></td>
                    <td>
                        <a style="color: white" th:href="@{/refutation-info/toUpdate.do(id=${list.getRefutationId()})}"><button class="btn btn-sm btn-primary">编辑</button></a>
                        <a style="color: white" th:href="@{/refutation-info/delete.do(id=${list.getRefutationId()},rId=${list.getRumourId()})}"><button class="btn btn-sm btn-danger">删除</button></a>
                    </td>
                </tr>
                </tbody>
            </table>
            <nav aria-label="Page navigation example">
                <ul class="pagination">
                    <li class="page-item"><a class="page-link" th:href="@{/refutation-info/show.do(pn=)}">首页</a></li>
                    <li class="page-item" th:if="${pageInfo.hasPreviousPage}">
                        <a class="page-link" th:href="@{/refutation-info/show.do(pn=${pageInfo.pageNum - 1})}">Previous</a>
                    </li>
                    <li th:each="pageNum:${pageInfo.navigatepageNums}">
                        <a th:if="${pageNum==pageInfo.pageNum}" class="page-link" th:href="@{#}" th:text="${pageNum}"></a>
                        <a th:if="${pageNum!=pageInfo.pageNum}" class="page-link" th:href="@{/refutation-info/show.do(pn=${pageNum})}" th:text="${pageNum}"></a>
                    </li>
                    <li class="page-item" th:if="${pageInfo.hasNextPage}">
                        <a class="page-link" th:href="@{/refutation-info/show.do(pn=${pageInfo.pageNum+1})}">Next</a>
                    </li>
                    <li class="page-item">
                        <a class="page-link" th:href="@{/refutation-info/show.do(pn=${pageInfo.pages})}">尾页</a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</div>
</body>
<script th:src="@{/jquery/jquery-3.5.1.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.js}"></script>
<script th:src="@{/bootstrap/datepicker/bootstrap-datepicker.zh-CN.min.js}"></script>
<script th:inline="javascript">
</script>
</html>